<%-- <script type="text/javascript" src="<%=request.getContextPath()%>/resources/js/jquery-1.7.2.min.js"></script> --%>
<script>
	// 	$("#loading").ajaxStart(function() {
	// 		alert("a");
	// 		$(this).show();
	// 	});

	// 	$("#loading").ajaxStop(function() {
	// 		//$(this).hide();
	// 	});

	$(document).on("click", ".loading_controller_group", function() {
		//$.ajax();
		showLoading();
	});

	$('#form-abide')
		.on('invalid', function () {
			unShowLoading();
		})
		.on('valid', function () {});
	//
	function showLoading() {
		$("#loading").fadeIn(300);
	}

	function unShowLoading() {
		$("#loading").fadeOut(300);
	}
	
	function showLoadingTransferBtn() {
		$("#transferButtonLoading").fadeIn(300);
	}

	function unShowLoadingTransferBtn() {
		$("#transferButtonLoading").fadeOut(300);
	}
	
	function showLoadingSearchPanel() {
		$("#searchPanelLoading").fadeIn(300);
		document.getElementById("BtnSearch").disabled = true;
    	$('#BtnSearch').attr('title','Searching...');		
	}
	function unShowLoadingSearchPanel() {
		$("#searchPanelLoading").fadeOut(300);
		document.getElementById("BtnSearch").disabled = false;
    	$('#BtnSearch').attr('title','');
	}
	
	function showLoadingSearchResult() {
		$("#searchResultLoading").fadeIn(300);
		document.getElementById("BtnSearch").disabled = true;
    	
	}
	
	function unShowLoadingSearchResult() {
		$("#searchResultLoading").fadeOut(300);
		document.getElementById("BtnSearch").disabled = false;
    	$('#BtnSearch').attr('title','');
	}
	
	// native loading in taks list
	function showNativeLoading(taskId) {
		var loadingDivId = "\"" + "nativeLoading-"+taskId+ "\"";
		$('[id=' + loadingDivId + ']').fadeIn(300);
	}

	function unShowNativeLoading(taskId) {
		var loadingDivId = "\"" + "nativeLoading-"+taskId+ "\"";
		$('[id=' + loadingDivId + ']').fadeOut(300);
	}
	// end native loading
	function showLoadingBottomSmall() {
		//$("#loading-bottom-small").show();
		$("#loading-bottom-small").fadeIn(300);		
	}

	function unShowLoadingBottomSmall() {
		//$("#loading-bottom-small").hide();
		$("#loading-bottom-small").fadeOut(300);
	}
</script>